import request from '@/utils/request'

// 查询公告列表
export function listArticle(query) {
    return request({
        url: '/yanglao/notice/list',
        method: 'get',
        params: query
    })
}

// 查询公告详细
export function getArticle(id) {
    return request({
        url: '/yanglao/notice/' + id,
        method: 'get'
    })
}

// 新增公告
export function addArticle(data) {
    return request({
        url: '/yanglao/notice',
        method: 'post',
        data: data
    })
}

// 修改公告
export function updateArticle(data) {
    return request({
        url: '/yanglao/notice',
        method: 'put',
        data: data
    })
}

// 删除公告
export function delArticle(ids) {
    return request({
        url: '/yanglao/notice/' + ids,
        method: 'delete'
    })
}
